package com.oa.admin.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.oa.admin.dto.HouseConditionDTO;
import com.oa.admin.entity.House;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.oa.admin.vo.HouseListVO;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 房屋表 Mapper 接口
 * </p>
 *
 * @author syb123
 * @since 2019-01-22
 */
@Repository
public interface HouseMapper extends BaseMapper<House> {
    /**
     * 分页查询列表
     *
     * @param page
     * @return
     */
    List<House> findList(Pagination page);

    /**
     * 查询所有列表
     *
     * @return
     */
    List<House> findList();

    /**
     * 根据id查询
     */
    House findById(@Param("id") String id);

    /**
     * 根据条件查询房屋列表--无分页
     *
     * @param houseConditionDTO
     * @return
     */
    List<HouseListVO> findHouseListByCondition(HouseConditionDTO houseConditionDTO);

    /**
     * 根据条件查询房屋列表--分页
     *
     * @param page
     * @param houseConditionDTO
     * @return
     */
    List<HouseListVO> findHouseListByCondition(Pagination page, HouseConditionDTO houseConditionDTO);
}
